package com.modai.springcloud.entities;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：modai
 * @date ：Created in 2020-12-14 23:11
 * @description：
 */
@RestController
@RefreshScope
public class ConfigController {
    @Value("${config.info}")
    private String configInfo;
    @Value("${spring.profiles.active}")
    private String profile;

    @GetMapping("/config")
    public String getInfo(){
        return "3377的"+profile+"配置文件，获得了信息："+configInfo;
    }


}
